package com.share.cloudStorage.logs.controller;

import com.github.pagehelper.PageInfo;
import com.share.cloudStorage.admin.model.Params;
import com.share.cloudStorage.logs.model.Logs;
import com.share.cloudStorage.logs.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/v1/logs")
public class LogController {
    @Autowired
    private LogService logService;
    @PostMapping("/getlog")
    public PageInfo getlog(@RequestBody Params params){
       List<Logs> logs = logService.getlog(params);
       return new PageInfo(logs);
    }

}
